<template>
	<view class="container server">
		<view class="repairs">
			<view class="content" v-for="(item,index) in server_all" :key="index">
				<view class="repairs1">
					<view class="a_1">
						<view class="msg">{{item.userName}}</view>
						<view class="btn" v-if="item.dealStatus == 0">待处理</view>
						<view class="btn" v-if="item.dealStatus == 1">已处理</view>
						<view class="btn" v-if="item.dealStatus == 2">不予处理</view>
					</view>
					<view class="a_2">
						<text>联系人：{{item.contacts}}</text>
						<text>联系电话：{{item.userPhone}}</text>
						<text>详细地址：{{item.userAddress}}</text>
						<text>设备ID：{{item.deviceId}}</text>
					</view>
				</view>
				<view class="repairs2">
					<view class="a_3">
						故障照片
					</view>
					<image src="../../../static/image/shop/1.png" mode=""></image>
					<!-- <image :src="serverImage" mode=""></image> -->
				</view>
				<view class="repairs3">
					<view class="a_4">
						故障描述
					</view>
					<view class="describe">
						<view class="txt">设备不能打水，预约取液放桶后无反应。</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import $hhtp from "@/ajax/http.js";
	export default {
		data() {
			return {
				serverImage: "",
				server_all:""
			}
		},
		onLoad() {
			this.getRepairOrderInfoList();
		},
		methods: {
			getRepairOrderInfoList() {
				$hhtp.request({
					url: "/waiter/index/getRepairOrderInfoList",
					method: "GET"
				}).then((res) => {
					console.log(res, "获取报修信息列表");
					this.server_all = res
				})
			}
		},
	}
</script>

<style scoped lang="scss">
	@import '@/common/sass/all/all.scss';
	
	.repairs {
		margin-top: 20rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		width: 678rpx;
		height: 607rpx;
		background-color: #ffffff;
		border-radius: 15rpx;

		.content {
			display: flex;
			flex-direction: column;
			width: 593rpx;
			height: 535rpx;

			.repairs1 {
				height: 190rpx;
				border-bottom: 1rpx solid #d8d8d8;
				display: flex;
				flex-direction: column;

				.a_1 {
					width: 593rpx;
					display: flex;
					justify-content: space-between;

					.msg {
						font-weight: 600;
						font-size: 26rpx;
						color: #00828C;
					}

					.btn {
						display: flex;
						justify-content: center;
						align-items: center;
						border-radius: 25rpx;
						width: 115rpx;
						height: 40rpx;
						font-weight: 400;
						font-size: 22rpx;
						color: #FFFFFF;
						background-color: #00828c;
					}
				}

				.a_2 {
					display: flex;
					flex-direction: column;
					font-weight: 400;
					font-size: 21rpx;
					color: #4C4948;
					line-height: 32rpx;
					margin-top: 10rpx;
					margin-bottom: 10rpx;
				}
			}

			.repairs2 {
				margin-top: 10rpx;

				.a_3 {
					font-weight: 400;
					font-size: 21rpx;
					color: #00828C;
					line-height: 32rpx;
					margin-bottom: 10rpx;
				}

				image {
					width: 593rpx;
					height: 153rpx;
					border: 1rpx solid #e5e5e5;
					border-radius: 15rpx;
				}
			}

			.repairs3 {

				.a_4 {
					font-weight: 400;
					font-size: 21rpx;
					color: #00828C;
					line-height: 32rpx;
					margin-bottom: 10rpx;
				}

				.describe {
					width: 593rpx;
					height: 100rpx;
					border: 1rpx solid #e2e2e2;
					border-radius: 15rpx;
					font-weight: 400;
					font-size: 24rpx;
					color: #4C4948;

					.txt {
						margin-top: 10rpx;
						margin-left: 10rpx;
					}
				}
			}
		}
	}
</style>